{% extends "base.html" %}
{% block title %} - Tweets{% endblock %}
{% block extra_head %}
<meta http-equiv="refresh" content="120">
{% endblock %}
{% block content %}
    <div id="content" class="content">
      <div class="container_16">
        {% if twitter_enabled %}
          <h2>Send a tweet about #openparty</h2>
          <form action="{% url update_tweet %}" method="post">
            <fieldset id="" class="">
              <div class="info">
                {% csrf_token %}
                <textarea cols="40" rows="2" id="status" name="status" accesskey="u" autocomplete="off" tabindex="1"></textarea>
                <input type="submit" name="update" value="update" id="update-submit" tabindex="2">
              </div>
            </fieldset>
          </form>
        {% endif %}
        <h2>Tweets about <em>#openparty</em></h2>
        {% include 'pagination.html' %}
        <ul class="tweets">
          {% for tweet in tweets %}
            <li>
              <span class="avatar"><a href="http://twitter.com/{{ tweet.tweet_user_id }}"><img width="48" height="48" src="{{ tweet.profile_image }}" alt="{{ tweet.tweet_user_name }}' Profile image" /></a></span>
              <span class="username"><a href="http://twitter.com/{{ tweet.tweet_user_id }}">{{ tweet.tweet_user_name }}</a></span>
              <span class="message">{{ tweet.text|safe }}</span>
              <span class="source">(from {{ tweet.source }})</p>
            </li>
          {% endfor %}
        </ul>
        {% include 'pagination.html' %}
      </div>
    </div>
{% endblock %}
